﻿/*
 * Microsoft .NET  2.0+ version of Sphinx searchd client (Sphinx API)
 * 
 * Copyright (c) 2009, Shaun Berryman
 * All rights reserved
 * 
 * This program is free software; you can redistribute it and/or modify
 * it under the terms of the GNU General Public License. You should have
 * received a copy of the GPL license along with this program; if you
 * did not, you can find it at http://www.gnu.org/
 */

using System;

namespace SphinxSearchApi
{
    /// <summary>
    /// Sometimes it could be useful to group (or in other terms, cluster) search results and/or 
    /// count per-group match counts - for instance, to draw a nice graph of how much maching 
    /// blog posts were there per each month; or to group Web search results by site; or to 
    /// group matching forum posts by author; etc. 
    /// </summary>
    public enum GroupByEnum : int
    {
        /// <summary>
        /// Extracts year, month and day in YYYYMMDD format from timestamp
        /// </summary>
        Day = 0,

        /// <summary>
        /// Extracts year and first day of the week number (counting from year start) in YYYYNNN format from timestamp
        /// </summary>
        Week = 1,

        /// <summary>
        /// Extracts month in YYYYMM format from timestamp
        /// </summary>
        Month = 2,

        /// <summary>
        /// Extracts year in YYYY format from timestamp
        /// </summary>
        Year = 3,

        /// <summary>
        /// Uses attribute value itself for grouping
        /// </summary>
        Attribute = 4,

        /// <summary>
        /// 
        /// </summary>
        AttributePair = 5
    }
}
